%%%%%%%%%%% Calibration of material and capital prices %%%%%%%%%%%%%
 setenv('PATH', [getenv('PATH') ':/Users/michaelrubens/Dropbox/Labor_cartels/code_data_round2']);


 clear;
global pbar eta theta0 uwbar psi  bl bm bk q N
cd '/Users/michaelrubens/Dropbox/Labor_cartels/code_data_round2'
load uwm.txt

 
q=uwm(:,1);
bl=uwm(:,2);
bm=uwm(:,3);
bk=uwm(:,4);
psi=uwm(:,5);
eta=uwm(:,6);
uwbar=uwm(:,7);
pbar=uwm(:,8);
theta0=uwm(:,9);
N=uwm(:,10);
%x0 = [30,10]         % starting values for uwk and uwm
x0 =10
%%

[x,fval ]=fminsearch(@uwm_obj,x0);
uwm_hat = x

writematrix(uwm_hat)   

